package br.com.ufrn.aipetro.ga.domain.entity.device.maintenance;

import br.com.ufrn.aipetro.ga.domain.entity.interfaces.AbstractModel;

public class Cause extends AbstractModel {

	public static final String ID_TB_CAUSE_PROPERTY = "idTbCause";
	public static final String NAME_PROPERTY = "name";
	
	private Integer idTbCause;
	private String name;
	
	public Cause() {
		
	}
	
	public Cause(String name) {
		this.name = name;
		
	}

	/**
	 * @return the idTbCause
	 */
	public Integer getIdTbCause() {
		return idTbCause;
	}
	
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param idTbCause the idTbCause to set
	 */
	public void setIdTbCause(Integer idTbCause) {
		Integer oldIdTbCause = this.idTbCause;
		this.idTbCause = idTbCause;
		
		firePropertyChange(ID_TB_CAUSE_PROPERTY, oldIdTbCause, idTbCause);
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		String oldName = this.name;
		this.name = name;
		
		firePropertyChange(NAME_PROPERTY, oldName, name);
	}
	
	public String toString() {
		return this.name;
	}



}
